package circular;
/*
例如，5的阶乘（表示为5!）是5 * 4 * 3 * 2 * 1 = 120。
5*4=20
20*3=60
60*2=120
120*1=120
*/
public class whiledemo2 {
    public static void main(String[] args) {
        int number =5;
        int factorial = number;
        while (number > 1) {
            factorial *= number - 1;
            number--;
        }
        System.out.println(factorial);
    }
}
